package spotGUI.supportGUI;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import java.util.ResourceBundle;

public class SupportFrame extends JFrame {



	private JTabbedPane tabbedPane;
	private JPanel aboutPanel;
	private JPanel reportBugPanel;
	private JPanel commentPanel;
	private JLabel image;
	
	
	public SupportFrame() {
		
		setSize(new Dimension(459, 517));
		setLocationRelativeTo(null);
		setTitle(ResourceBundle.getBundle("spotGUI.supportGUI.messages").getString("SupportFrame.this.title")); //$NON-NLS-1$ //$NON-NLS-2$
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		setResizable(false);
		setIconImage(Toolkit.getDefaultToolkit().getImage(SupportFrame.class.getResource("/images/Icons/64x64/users_comments.png")));
		
		
		aboutPanel = new AboutPanel();
		reportBugPanel = new ReportBugPanel();
		commentPanel = new CommentPanel();
		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBorder(null);
		
		tabbedPane.add(aboutPanel);
		tabbedPane.setTitleAt(0, ResourceBundle.getBundle("spotGUI.supportGUI.messages").getString("SupportFrame.t1"));
		tabbedPane.add(reportBugPanel);
		tabbedPane.setTitleAt(1, ResourceBundle.getBundle("spotGUI.supportGUI.messages").getString("SupportFrame.t2"));
		tabbedPane.add(commentPanel);
		tabbedPane.setTitleAt(2, ResourceBundle.getBundle("spotGUI.supportGUI.messages").getString("SupportFrame.t3"));
		
		
		getContentPane().add(tabbedPane, BorderLayout.CENTER);
		
		image = new JLabel("");
		image.setAlignmentX(Component.RIGHT_ALIGNMENT);
		image.setIcon(new ImageIcon(SupportFrame.class.getResource("/images/GUIBackgrounds/wavesForFirstRun.png")));
		getContentPane().add(image, BorderLayout.SOUTH);
		
		setVisible(true);
		
	}

	protected JTabbedPane getTabbedPane() {
		return tabbedPane;
	}
}
